template(name="statisticsIndexBoard")
  div#modal-header.modal-header
    div.closeD.js-closeD-modal
      span.fa.fa-close
    div.expandD.js-expandD
      span.fa.fa-expand.expandS
    h4 {{_ 'statistics'}}
  ul.s-tab.nav-tabs
    li.s-tab-index.js-s-tab3 人员周报
    li.s-tab-index.js-s-tab2 标签统计
    li.s-tab-index.js-s-tab1 人员任务统计
  .tool-bar
    if tabIndex2
      .search
        //- label 人员
        //- input(type="text"  id="person" style="width:40%" placeholder="请输入人员")
        //- label 标题
        //- input(type="text"  id="title" style="width:40%" placeholder="请输入标题")
        //- each item in time
        //-   .js_startTime
        //-     label.labeltime 开始时间
        //-     input( id ="startDate" type="date" value=item.startTime)
        //-   .js_endTime
        //-     label.labeltime 结束时间
        //-     input( id="endDate" type="date" value=item.endTime)
        //+calendarView
        //.content_time
        +weekTimePopup
        //+cardCustomField-datePopup
        //+editCardStartDatePopup
        a.week_button.button_left(type="submit")
          span.time_left
        a.week_button.button_right
          span.time_right
        a.js-search 查询
        a.js_week 回到本周
      //.set
      .set-coclumn.js-set-staff 设置统计人员
          if setStaffViewShow
            ul.set-column-pop
              each popMenu1ToggleArr
                li.pop-item.js-pop-item1
                  if checked
                    span.fa.fa-check.set-column-pop-check
                  {{popTitle}}
      .set-coclumn.js-set-coclumn 设置统计列
          if setColumnViewShow
            ul.set-column-pop
              each popMenuToggleArr
                li.pop-item.js-pop-item
                  if checked
                    span.fa.fa-check.set-column-pop-check
                  {{popTitle}}
    if tabIndex1
      .set1
        .set-coclumn.js-set-staff 设置统计人员
          if setStaffViewShow
            ul.set-column-pop
              each popMenu1ToggleArr
                li.pop-item.js-pop-item1
                  if checked
                    span.fa.fa-check.set-column-pop-check
                  {{popTitle}}
        .set-coclumn.js-set-coclumn 设置统计列
          if setColumnViewShow
            ul.set-column-pop
              each popMenuToggleArr
                li.pop-item.js-pop-item
                  if checked
                    span.fa.fa-check.set-column-pop-check
                  {{popTitle}}
    if tabIndex0
      .set1
        .set-coclumn.js-set-staff 设置统计人员
          if setStaffViewShow
            ul.set-column-pop
              each popMenu1ToggleArr
                li.pop-item.js-pop-item1
                  if checked
                    span.fa.fa-check.set-column-pop-check
                  {{popTitle}}
        .set-coclumn.js-set-coclumn 设置统计列
          if setColumnViewShow
            ul.set-column-pop
              each popMenuToggleArr
                li.pop-item.js-pop-item
                  if checked
                    span.fa.fa-check.set-column-pop-check
                  {{popTitle}}
  div.s-dialog-content.s-tab0(
    class="{{#if tabIndex0}}s-tab-show{{/if}}"
    class="{{#if tabIndex1}}s-tab-hide{{/if}}"
    class="{{#if tabIndex2}}s-tab-hide{{/if}}"
    )
      tbody.tb
        tr#s-tb-tr-h
         each value in titleArr
           th.sorting.js-sorting {{value}}({{indexThCount(value)}})
              if $eq value "被指派人"
                span.fa
              else
                span.fa.fa-sort
        each value in boardUsersInfo
          tr.s-tb-tr {{getIndexTdValIndex1(value)}}
            //- each titleArr
            //-   td {{setIndexTitle(this)}}{{getIndexTdValIndex(value)}}11

  div.s-dialog-content.s-tab1(
    class="{{#if tabIndex1}}s-tab-show{{/if}}"
    class="{{#if tabIndex0}}s-tab-hide{{/if}}"
    class="{{#if tabIndex2}}s-tab-hide{{/if}}"
    )
    #labelsPie
    #labelsBar
  div.s-dialog-content.s-tab2(
    class="{{#if tabIndex2}}s-tab-show{{/if}}"
    class="{{#if tabIndex1}}s-tab-hide{{/if}}"
    class="{{#if tabIndex0}}s-tab-hide{{/if}}"
    )
      tbody.tb
        tr#s-tb-tr-h
         each value in weektitleArr
           th.sorting.sorting1(draggable="true")
            a(href="#" style="text-decoration:none;") {{value}}

        each value in data
          if (value.endAt)
              tr.s-tb-tr.finish
                td(data-key=value.key0).week  {{value.assignees}}
                td(data-key=value.key6).week  {{value.cardMembers}}
                td(data-key=value.key2).week.fin
                  span 11
                  span
                    a.title1(href="{{pathFor 'cardNew' boardId=value.boardId cardId=value.id}}" target="_black"){{value.title}}
                td(data-key=value.key5).week
                  each item in value.cardLabels
                    span(class="card-label2 card-label-{{item.color}}" style='font-size:12px') {{item.name}}
                td(data-key=value.key1).week {{value.createdAt}}
                td(data-key=value.key4).week {{value.time}}
          else
               tr.s-tb-tr.unfinish
                td(data-key=value.key0).week  {{value.assignees}}
                td(data-key=value.key6).week  {{value.cardMembers}}
                td(data-key=value.key2).week.unfin
                  span 11
                  span
                    a.title1(href="{{pathFor 'cardNew' boardId=value.boardId cardId=value.id}}" target="_black"){{value.title}}
                td(data-key=value.key5).week
                  each item in value.cardLabels
                    span(class="card-label2 card-label-{{item.color}}" style='font-size:12px') {{item.name}}
                td(data-key=value.key1).week {{value.createdAt}}
                td(data-key=value.key4).week {{value.time}}
      .box
        .page1
          input.js_page(type="text" width="20px" value="50" style="text-align:center")
          span 条/页
          #pagination1.page.fl
        //.info.fl
          //- p 当前页数：
          //-   span(id="current1")


template(name="statisticsPopMenu")
  li {{title}}
    if checked
      span.fa.fa-check.set-column-pop-check

template(name="weekTimePopup")
  each item in time
      span.start_time {{item.startTime}}
      span.center_time
      span.end_time {{item.endTime}}






